package com.exam.system.service;

import com.exam.system.entity.SysUser;
import com.exam.system.mapper.SysUserMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author LY
 * @create 2023/10/8 14:10
 * @Description 用户service
 */
@Service
public class SysUserServiceimpl {

    @Resource
    private SysUserMapper sysUserMapper;

    /**
     * 获取用户信息
     * @param username
     * @return
     */
    public SysUser findSysUser(String username){
        return sysUserMapper.findSysUser(username);
    }

    /**
     * 获取用户权限
     * @param username
     * @return
     */
    public List<String> getSysUserPerms(String username){
        return sysUserMapper.getSysUserPerms(username);
    }
}
